<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

<style type="text/css">
#giftCardListT td {
	border:1px solid #bbbbbb;
}
</style>

</head>
<body>

<h2>모바일 상품권 현황</h2>

<c:if test="${fn:length(cardList) > 0 }">
<table id="giftCardListT" cellspacing="0" cellpadding="5" align="center" width="100%" style="text-align:center;">
	<tr class="table_title">
		<td>No.</td>
		<td>업체명</td>
		<td>상품권명</td>
		<td>상품권 금액</td>
		<td>이미지</td>
	</tr>
	<c:forEach var="list" items="${cardList }">
		<tr>
			<td>${list.card_no }</td>
			<td>${list.card_coname }</td>
			<td>${list.card_name }</td>
			<td>${list.card_price }</td>
			<td>
				<img src="resources/images/uploadFiles/${list.card_img_savname }"
					style="width:120px;height:120px;"
				/>
			</td>
		</tr>	
	</c:forEach>
</table>
</c:if>
<c:if test="${fn:length(cardList) <= 0 }">
	<table align="center" width="100%" style="text-align:center;">
		<tr>
			<td>등록된 상품권이 없습니다.</td>
		</tr>
	</table>
</c:if>

</body>
</html>